package com.moli.iov.down.command.codec.encode.data;

import com.moli.iov.down.model.dto.remoting.CommandDto;
import com.moli.iov.util.DateUtil;
import com.moli.iov.util.NumberUtil;
import org.apache.commons.lang.ArrayUtils;

/**
 * <p>
 *
 * </p>
 *
 * @author: zql
 * @Date: 2018/11/28 11:59
 */
public class BaseEncoder {

    public byte[] getByteBuf(CommandDto commandDto){
        byte[] date = DateUtil.getDateOfByte();
        //命令流水号
        byte[] serialNumberByte = NumberUtil.intToHexToByte(commandDto.getCommandNo(), 4);

        return ArrayUtils.addAll(date, serialNumberByte);
    }
}
